import request from './request'

// 获取所有医生
export function getDoctorListApi() {
  return request({
    url: '/doctor/findAll',
    method: 'get'
  })
}

// 根据ID获取医生
export function getDoctorByIdApi(docId) {
  return request({
    url: '/doctor/findById',
    method: 'get',
    params: { docId }
  })
}

// 新增医生
export function addDoctorApi(data) {
  return request({
    url: '/doctor/add',
    method: 'post',
    data
  })
}

// 更新医生信息
export function updateDoctorApi(data) {
  return request({
    url: '/doctor/update',
    method: 'post',
    data
  })
}

// 删除医生
export function deleteDoctorApi(docId) {
  return request({
    url: '/doctor/delete',
    method: 'get',
    params: { docId }
  })
} 